function [CDDM_Weight, CDDM_bias] = generate_CDDM_Weight(data_train, random_indices, is, num_neighbor)
    CDDM_Weight = [];
    CDDM_bias = [];
    
    xg = data_train(random_indices, :); % x*
    i_neighbor = is(1:num_neighbor, random_indices);
    
    for count = 1:size(random_indices, 1)
        xp = [ones(num_neighbor, 1), data_train(i_neighbor(:, count), 2:end)];
        yp = data_train(i_neighbor(:, count), 1);
        yp = process_yp(yp);
        ap = QR_schmidt(xp, yp); 
        
        CDDM_Weight_temp = 4 * ap(2:end); % hidden node weights
        CDDM_bias_temp = -CDDM_Weight_temp' * xg(count, 2:end)'; % hidden node bias
        
        CDDM_Weight = [CDDM_Weight; CDDM_Weight_temp'];
        CDDM_bias = [CDDM_bias, CDDM_bias_temp];
    end
end
